package com.android.avy;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class ZoneDetails extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        Intent intent = getIntent();
        Cursor c = managedQuery(intent.getData(), null, null, null, null);
        c.moveToFirst();
        
        setContentView(R.layout.zone_day_rose);
        
        TextView tv = (TextView) findViewById(R.id.zoneday_rose_zone);
        tv.setText(c.getString(c.getColumnIndex(ZoneData.ZoneDays.COL_NAME_ZONE)));
        
        ImageView iv = (ImageView) findViewById(R.id.zoneday_rose_rose);
        iv.setImageDrawable(DangerRose.buildRose(
        		c.getString(c.getColumnIndex(ZoneData.ZoneDays.COL_NAME_ROSE))));
        
        tv = (TextView) findViewById(R.id.zoneday_rose_date);
        tv.setText(c.getString(c.getColumnIndex(ZoneData.ZoneDays.COL_NAME_DATE)));
        
        tv = (TextView) findViewById(R.id.zoneday_rose_info);
        tv.setText(c.getString(c.getColumnIndex(ZoneData.ZoneDays.COL_NAME_STATEMENT)));
        
    }
}